package com.yhhvip.user.dao;

import com.yhhvip.user.entity.UserKeys;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;



@Repository
public interface UserKeysDao extends JpaRepository<UserKeys,Integer>,JpaSpecificationExecutor<UserKeys> {

   @Query(value = " from UserKeys userKeys where userKeys.userId=?1")
    UserKeys IsUserKeyByUserId(Integer userId);
    @Query(value = " from UserKeys userKeys where userKeys.userKey=?1")
    UserKeys IsUserKeyByUserKey(String userKey);
}
